// components/huli/index.js
const app = getApp()
let {
  baseUrl,
  commonUpdate,
  commonUpload
} = app.globalData
Component({

  properties: {
    list: {
      type: Array
    }
  },
  data: {
    commonUpload,
    baseUrl
  },
  methods: {
    formatter(val) {
      console.log(val)
      return '123'
    },
    onClick(e) {
      /* //跳转到详情界面
      // 将对象转换为JSON字符串  
           let jsonStr = JSON.stringify(e.currentTarget.dataset.v) 
      // 对JSON字符串进行编码，以便它可以安全地放在URL中  
         let encodedJsonStr = encodeURIComponent(jsonStr);  */
      wx.navigateTo({
        url: `/components/detailPage/index?id=${e.currentTarget.dataset.v.id}`,
      })
    }
  }

})